package com.manage.modules.utils;


import com.manage.common.config.RuoYiConfig;

/**
 * 上传配置
 *
 * @author xu
 * 2021/8/18 15:31
 */
public class UploadConfig {
    /**
     * 获取上传故障照片路径
     */
    public static String getFaultPath() {
        return RuoYiConfig.getProfile() + "/fault/" + DateUtil.getNowDate() + "/";
    }

    /**
     * 获取上传根路径
     */
    public static String getProfile() {
        return System.getProperty("user.dir");
    }

    public static void main(String[] args) {
        System.out.println(getProfile());
    }

    /**
     * 获取跟路径
     */
    public static String getParentPath(String parent) {
        return RuoYiConfig.getProfile() + "/" + parent + "/" + DateUtil.getNowDate() + "/";
    }
}
